import request from "@/utils/request";

export const pageList = (data) => {
    return request({
        url: "/venueServerContent/pageList",
        method: "post",
        data,
    });
};

export const deleteById = (id) => {
    return request({
        url: "/venueServerContent/deleteById",
        method: "delete",
        params: {
            id: id
        },
    });
};

export const publish = (id) => {
    return request({
        url: `/venueServerContent/publish`,
        method: "post",
        params: {
            id: id
        }
    });
};

export const offShelf = (id) => {
    return request({
        url: `/venueServerContent/offShelf`,
        method: "post",
        params: {
            id: id
        }
    });
};

export const create = (data) => {
    return request({
        url: `/venueServerContent/create`,
        method: "post",
        data
    });
};

export const edit = (data) => {
    return request({
        url: `/venueServerContent/edit`,
        method: "post",
        data
    });
};

export const detail = (id) => {
    return request({
        url: `/venueServerContent/detail`,
        method: "get",
        params: { id: id }
    });
};

export const checklist = (data) => {
    return request({
        url: `/venueServerContent/checklist`,
        method: "post",
        data
    });
};

export const audit = (id, userid, userCnName) => {
    return request({
        url: `/venueServerContent/submit/${id}/${userid}/${userCnName}`,
        method: "get",
    });
};

export const checkPost = (data) => {
    return request({
        url: `/system/activityConfiguration/checkPost`,
        method: "post",
        data,
    });
};

export const getAuditUser = (sub_sys_en_name, role_en_name) => {
    return request({
        url: `/system/activityConfiguration/users/${sub_sys_en_name}/${role_en_name}`,
        method: "get",
    });
};

export const checkSubmit = (data) => {
    return request({
        url: `/venueServerContent/checkSubmit`,
        method: "post",
        data
    });
};

export const actionLog = (params) => {
    return request({
        url: `/system/actionLog/list`,
        method: "get",
        params
    });
};

export function listUsers(sub_sys_en_name,role_en_name) {
  return request({
    url: `/venueServerContent/users/${sub_sys_en_name}/${role_en_name}`,
    method: 'get'
  })
}
